export default {
  data() {
    return {
      list: [],
      listLoading: false,
      pagesize: 5,
      pagenum: 1,
      total: 0,
      //添加数据定义
      formLabelWidth: "80px",
      addVisible: false,
      //修改
      modVisible: false,
      //防止重复提交
      isDisable: false
    }
  },
  methods: {
    //转译定义
    flagType(row) {
      return row.flag === "0" ? "有效" : row.flag === "1" ? "无效" : "未知";
    },
    closeAdd() {
      this.addVisible = false;
      this.$refs.addfrom.resetFields();
    },
    closeMod() {
      this.modVisible = false;
      this.$refs.modfrom.resetFields();
    },
    addOpen() {
      this.addVisible = true;
    },
    handleSizeChange(val) {
      this.pagenum = 1;
      this.pagesize = val;
      this.queryparam.pagesize = val;
      this.fetchData();
    },
    handleCurrentChange(val) {
      this.pagenum = val;
      this.queryparam.pagenum = val;
      this.fetchData();
    },
  }

}

